package com.ruoyi.exam.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;


/**
 * 练习题目对象 exam_random_practice_question
 *
 * @author Tellsea
 * @date 2025-07-28
 */
@Data
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName("exam_random_practice_question")
public class ExamRandomPracticeQuestion extends BaseEntity {

    /**
     * 练习题目ID
     */
    @TableId(type = IdType.AUTO)
    private Long practiceQuestionId;

    /**
     * 练习ID
     */
    @Excel(name = "练习ID")
    private Long practiceId;

    /**
     * 题目ID
     */
    @Excel(name = "题目ID")
    private Long questionId;

    /**
     * 题目顺序
     */
    @Excel(name = "题目顺序")
    private Long questionOrder;

    /**
     * 用户答案
     */
    @Excel(name = "用户答案")
    private String userAnswer;

    /**
     * 是否正确（0错误 1正确）
     */
    @Excel(name = "是否正确", readConverterExp = "0=错误,1=正确")
    private String isCorrect;

    /**
     * 得分
     */
    @Excel(name = "得分")
    private BigDecimal score;

    /**
     * 答题时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "答题时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date answerTime;

    /**
     * 答题用时（秒）
     */
    @Excel(name = "答题用时", readConverterExp = "秒=")
    private Long timeSpent;

}
